import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/sys',
  component: Layout,
  redirect: '/sys/sysUserList',
  name: 'userList',
  meta: {
    title: '系统管理',
    icon: 'ep:setting',
  },
  children: [
    {
      path: 'sysUserList',
      name: 'sysUserList',
      component: () => import('@/views/sys/sysUserList.vue'),
      meta: {
        title: '人员管理',
        menu: true,
        breadcrumb: false,
        icon: 'ep:avatar',
        activeMenu: '/sys',
      },
    },
    {
      path: 'sysMenuList',
      name: 'sysMenuList',
      component: () => import('@/views/sys/sysMenulist.vue'),
      meta: {
        title: '权限管理',
        menu: true,
        breadcrumb: false,
        icon: 'ep:menu',
        activeMenu: '/sys',
      },
    },
    {
      path: 'sysRoleList',
      name: 'sysRoleList',
      component: () => import('@/views/sys/sysRoleList.vue'),
      meta: {
        title: '角色管理',
        menu: true,
        breadcrumb: false,
        icon: 'ep:office-building',
        activeMenu: '/sys',
      },
    },
  ],
}

export default routes
